package random;

import java.util.Random;

/*
 * 需求：
 *   给定一个值，输出区间在[1,n]之间的100个随机正整数。（注意为闭区间）
 *
 * */
public class RandomTest02 {
    public static void main(String[] args) {
        Random r = new Random();

        int k = 0;
        for (int i = 0; i < 100; i++) {
            int num = (r.nextInt(10)) + 1;
            System.out.print(num + "\t");
            k++;
            if (k == 10) {
                System.out.println();
                k = 0;
            }
        }
    }
}
